<template>
    <BaseEcharts :chatsOption="chatsOption"></BaseEcharts>
</template>

<script>
    import BaseEcharts from "../../../components/common/Cahrts/coreEcharts"

    import pieBaseConfig from "../../../echartsBaseConfig/pie"


    export default {
        components: {
            BaseEcharts
        },
        props: {
            chatsOption: {
                type: Object,
                default() {
                    return {
                        ...pieBaseConfig,
                        title: {
                            text: "商业用地",
                            left: "center",
                            bottom: "2%",
                            textStyle: {
                                color: "#fff",
                                fontSize: 40,

                            },
                        },

                        series: [
                            {

                                name: '访问来源',
                                type: 'pie',
                                selectedMode: 'single',
                                radius: ["30%", '50%'],
                                center: ["50%", "50%"],
                                label: {
                                    show: false,
                                    position: 'center',
                                    bleedMargin: 5,
                                    fontSize: 40,
                                    // alignTo: 'labelLine',
                                },

                                labelLine: {
                                    show: true,
                                    // length: 10,
                                    // length2: 10,
                                },
                                emphasis: {
                                    label: {
                                        show: true,
                                        fontSize: '40',
                                        fontWeight: 'bold'
                                    }
                                },
                                clockWise: false,

                                // labelLine: {
                                //     show: false
                                // },
                                data: [
                                    {value: 3235, name: '直达'},
                                    {value: 6709, name: '营销广告'},
                                    {value: 1548, name: '搜索引擎'}
                                ]
                            },
                            {

                                name: '访问来源',
                                type: 'pie',
                                radius: ['50%', '70%'],
                                center: ["50%", "50%"],
                                label: {
                                    position: 'outer',
                                    bleedMargin: 5,
                                    fontSize: 40,
                                    alignTo: 'labelLine',
                                    show: false,
                                },
                                labelLine: {
                                    show: false,
                                    length: 0,
                                    length2: 200,
                                },
                                data: [
                                    {value: 335, name: '直达'},
                                    {value: 310, name: '邮件营销'},
                                    {value: 234, name: '联盟广告'},
                                    {value: 135, name: '视频广告'},
                                    {value: 1048, name: '百度'},
                                    {value: 251, name: '谷歌'},
                                    {value: 147, name: '必应'},
                                    {value: 102, name: '其他'},
                                ]
                            }
                        ]
                    };
                    ;
                }
            }
        }

    }
</script>
